<#include "/templates/taglibs.ftl" />
<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <title>用户登录</title>
        <link href="${contextPath}/favicon.ico" rel="icon">
        <link rel="stylesheet" href="${contextPath}/assets/plugins/layui/css/layui.css" media="all" />
        <link rel="stylesheet" href="${contextPath}/assets/css/account.css" />
        <script>
        if (top != self){
            try { if (top.document.location.toString()) {top.location=self.location; } }
            catch(err){
                try { if (parent.document.location.toString()) { top.location=parent.location } }
                catch(err){
                    top.location=self.location;
                }
            }
        }
        </script>
    </head>
    <body>
       <div class="sign">
          <div class="w">
              <div class="sign-logo">
                  <img alt="logo" src="${contextPath}/assets/images/logo.png">
                  <span class="logo-name">${SystemName}</span>
              </div>
          </div>
          <div class="sign-content">
              <div class="w">
                  <div class="sign-name layui-hide-xs">
                      <img src="${contextPath}/assets/images/login_name.png" />
                  </div>
                  <div class="sign-box">
                      <div class="sign-header">
                          <a class="active" href="login">登录</a>
                      </div>
                      <div class="sign-body">
                          <form class="layui-form"  lay-filter="login">
                                <div class="tip-box"> 
                                <#if (SPRING_SECURITY_LAST_EXCEPTION.message)?has_content>
                                    ${(SPRING_SECURITY_LAST_EXCEPTION.message)!''}
                                </#if>
                                </div>
                              <div class="layui-form-item">
                                  <i class="layui-icon layui-icon-username"></i>
                                  <input type="text" id="username" name="username" value="${Session['SPRING_SECURITY_LAST_USERNAME']}"  autocomplete="off" 
                                  onkeyup="this.value=this.value.replace(/[\u4e00-\u9fa5]/g,'')"  lay-verify="required" lay-verType="tips" placeholder="登录名/手机/邮箱" class="layui-input">
                              </div>
                              <div class="layui-form-item">
                                  <input type="password" id="pubword" name="pubword" lay-verify="required|pass" autocomplete="off" lay-verType="tips"  placeholder="密码" class="layui-input">
                                  <input type="hidden" id="pubkey" name="pubkey"  value="${publicKey}" />
                                  <input type="hidden" id="password" name="password" value="" />
                                  <i class="layui-icon layui-icon-password"></i>
                               </div>
                               <div class="layui-form-item">
                                    <input type="text" id="validateCode" name="validateCode" lay-verify="required" autocomplete="off" lay-verType="tips"  placeholder="验证码" class="layui-input">
                                    <i class="layui-icon layui-icon-vercode"></i>
                                    <a href="javascript:;" onclick="jQuery('#vcImg').attr('src','${rc.getContextPath()}/validatecode?randomStr='+randomString(6));">
                                        <img id="vcImg" class="vcImg" src="" title="点击换一张">
                                    </a>
                                    <div class="beg-pull-right beg-remember">
                                          <a href="javascript:;" class="">登录遇到问题？</a>
                                          <ul class="dropdown-menu">
                                            <li><a href="mobile_reset">用手机号重置密码</a></li>
                                            <li><a href="email_reset">用邮箱重置密码</a></li>
                                          </ul>
                                    </div>
                              </div>
                              <div class="layui-form-item">
                                  <input type="hidden" id="_csrf" name="_csrf" value="${_csrf.token}" />
                                  <input type="button" value="登录" id="btn-login" lay-submit="" lay-filter="login"  class="layui-btn layui-btn-normal" style="width: 100%;">
                              </div>
                          </form>
                       </div>
                    </div>
                </div>
            </div>
            <div class="w">
                <div class="sign-footer">
                    <div class="copyright">
                        Copyright&nbsp;©&nbsp;2022 版权所有
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript" src="${contextPath}/assets/plugins/layui/layui.js"></script>
        <script type="text/javascript" src="${contextPath}/assets/js/jquery.min.js"></script>
        <script type="text/javascript" src="${contextPath}/assets/js/jsencrypt.min.js"></script>
        <script type="text/javascript" src="${contextPath}/assets/js/base64.min.js"></script>
        <script type="text/javascript" src="${contextPath}/assets/js/account.js"></script>
    </body>
</html>
